import request from '@/utils/request'

// 查询基金费用明细列表
export function listFundExpenseFeeDetail(query) {
  return request({
    url: '/expenseFeeDetail/fundExpenseFeeDetail/list',
    method: 'get',
    params: query
  })
}

// 查询基金费用明细详细
export function getFundExpenseFeeDetail(id) {
  return request({
    url: '/expenseFeeDetail/fundExpenseFeeDetail/' + id,
    method: 'get'
  })
}

// 保存基金费用明细
export function saveFundExpenseFeeDetail(data) {
  return request({
    url: '/expenseFeeDetail/fundExpenseFeeDetail/save',
    method: 'post',
    data: data
  })
}

// 删除基金费用明细
export function delFundExpenseFeeDetail(id) {
  return request({
    url: '/expenseFeeDetail/fundExpenseFeeDetail/' + id,
    method: 'delete'
  })
}

// 导出基金费用明细
export function exportFundExpenseFeeDetail(query) {
  return request({
    url: '/expenseFeeDetail/fundExpenseFeeDetail/export',
    method: 'get',
    params: query
  })
}

// 批量保存基金费用明细
export function batchSaveFundExpenseFeeDetail(list, expenseId) {
  return request({
    url: '/expenseFeeDetail/fundExpenseFeeDetail/batchSave/' + expenseId,
    method: 'post',
    data: list
  })
}

// 查询基金费用明细列表合计
export function getFundExpenseFeeDetailSum(query) {
  return request({
    url: '/expenseFeeDetail/fundExpenseFeeDetail/getSum',
    method: 'get',
    params: query
  })
}

// 计算费用金额
export function calculateExpenseAmount(expenseId, list) {
  return request({
    url: '/expenseFeeDetail/fundExpenseFeeDetail/calculateExpenseAmount/' + expenseId,
    method: 'post',
    data: list
  })
}
